<?php
session_name(DicomScience);
session_start();
require('session.php');
require('html_head.php');
?>
<body onresize="resizeWindow()">
<script type="text/javascript" src="library.js"></script>
<script>
	$(document).ready(function(){
		windowBase();
	});
</script>
<div id="mainMenu">
	<div id="login">
	<?php
	if($_SESSION['userid'] == 0){
		// GuestMode: No user logged in - show login window
		echo "<img id=\"loginButton\" class=\"hiddenMenuItem\" src=\"./themes/$thdir/but_arr_down.png\" alt=\"Login\"/>";
	} else {
		// Logged in - shów logout window
		echo "<img id=\"logoutButton\" class=\"hiddenMenuItem\" src=\"./themes/$thdir/but_x_it.png\" alt=\"Logout\" />";
	}
	?>
	</div>
	<div id="userName">
		<?php 
		$firstname = $_SESSION['firstname'];
		$lastname = $_SESSION['lastname'];
		echo $firstname." ".$lastname.$nls_welcome_to_dicomscience; 
		?>
	</div>

	<div id='menuLibrary'><?php echo $nls_library;?></div>
	
	<div id='libSearch'><?php echo $nls_search;?><input type='text' id='libSearchText' /></div>
	<?php
		if ($_SESSION['userid'] != 0){
			echo "<div id='reportView'>$nls_myReports</div>";
		}
	?>
	<?php
		if ($_SESSION['userid'] != 0){
			echo "<div id='caseView'>$nls_myCases</div>";
		}
	?>
</div>

<div id="loginWindow">
	<form id="loginForm" method="POST" action="login.php">
		<input type="text" class="loginField" id="loginUsername" name="loginUsername" value="<?php echo $nls_username; ?>"/>
		<input type="password" class="loginField" id="loginPassword" name="loginPassword" value="<?php echo $nls_password; ?>"/>
		<input type="checkbox" class="loginCheckbox" name="setCookie" value="true" /><?php echo "$nls_set_Cookie"; ?>
		<input type="submit" class="loginFieldButton" name="loginSubmit" id="loginSubmit" value="<?php echo $nls_login; ?>">
		<input type="button" class="loginFieldButton" name="loginAbort" id="loginAbort" value="<?php echo $nls_abort; ?>">
	</form>			
</div>
<div id='libMain'>
	<ul> 
		<li><a href='#cases'><?php echo $nls_cases; ?></a></li> 
		<li><a href='#reports'><?php echo $nls_reports; ?></a></li> 
		<li><a href='#media'><?php echo $nls_media; ?></a></li> 
	</ul>
	<div id='cases' class='accordion'><div id='caseList'></div></div>
	<div id='reports' class='accordion'><div id='accordion'></div></div>
	<div id='media'><div id='mediaList'></div></div> 
</div>
<div class="divDialog" id="editorId"><?php echo $_SESSION['userid'];?></div>
<div class="divDialog" id="reportText1"><?php echo $nls_openReportEditor; ?></div>	
<div class="divDialog" id="reportText2"><?php echo $nls_reportSaved; ?></div>
<div class="divDialog" id="caseText1"><?php echo $nls_openCaseEditor; ?></div>
<div class="divDialog" id="mediaText1"><?php echo $nls_tags; ?></div>	
<div class="divDialog" id="mediaText2"><?php echo $nls_modality; ?></div>
<div class="divDialog" id="mediaText3"><?php echo $nls_organ; ?></div>
<div class="divDialog" id="mediaText4"><?php echo $nls_uploadDate; ?></div>
<div class="divDialog" id="mediaText5"><?php echo $nls_windowCenter; ?></div>
<div class="divDialog" id="mediaText6"><?php echo $nls_windowWidth; ?></div>
<div class="divDialog" id="mediaText7"><?php echo $nls_laterality; ?></div>
<div class="divDialog" id="mediaText8"><?php echo $nls_imageComment; ?></div>
<div class="divDialog" id="mediaText9"><?php echo $nls_contrast; ?></div>
<div class="divDialog" id="mediaText10"><?php echo $nls_mrAquisitionType; ?></div>
<div class="divDialog" id="mediaText11"><?php echo $nls_sequenceName; ?></div>
<div class="divDialog" id="mediaText12"><?php echo $nls_sliceThickness; ?></div>
<div class="divDialog" id="mediaText13"><?php echo $nls_kV; ?></div>
<div class="divDialog" id="mediaText14"><?php echo $nls_protocolName; ?></div>
<div class="divDialog" id="mediaText15"><?php echo $nls_kernel; ?></div>
<div class="divDialog" id="mediaText16"><?php echo $nls_mrCoil; ?></div>
<div class="divDialog" id="mediaText17"><?php echo $nls_flipAngle; ?></div>
<div class="divDialog" id="mediaText18"><?php echo $nls_patPos; ?></div>
<div class="divDialog" id="mediaText19"><?php echo $nls_sens; ?></div>
<div class="divDialog" id="mediaText20"><?php echo $nls_manufacturer; ?></div>
<div class="divDialog" id="mediaText21"><?php echo $nls_mediaEditor; ?></div>
<div class="divDialog" id="mediaText22"><?php echo $nls_mediaSavedChanges; ?></div>
<div class="divDialog" id="mediaText23">
<select name="modality" class="mediaModalitySelector" id="mediaModalitySelector">
	<option></option>
	<option>AU</option>
	<option>BI</option>
	<option>CD</option>
	<option>CR</option>
	<option>CT</option>
	<option>DD</option>
	<option>CG</option>
	<option>DX</option>
	<option>IO</option>
	<option>IVUS</option>
	<option>ECG</option>
	<option>EPS</option>
	<option>ES</option>
	<option>HD</option>
	<option>LS</option>
	<option>MR</option>
	<option>MG</option>
	<option>NM</option>
	<option>OT</option>
	<option>PT</option>
	<option>PX</option>
	<option>TG</option>
	<option>RF</option>
	<option>RTDOSE</option>
	<option>RTIMAGE</option>
	<option>RTPLAN</option>
	<option>RTSTRUCT</option>
	<option>ST</option>
	<option>US</option>
	<option>XA</option>
</select>
</div>
<div class="divDialog" id="mediaText24">
<select name="organ" class="mediaModalitySelector" id="mediaOrganSelector">
	<option></option>
	<option>HEAD</option>
	<option>SKULL</option>
	<option>CSPINE</option>	
	<option>TSPINE</option>
	<option>LSPINE</option>
	<option>SSPINE</option>
	<option>COCCYX</option>
	<option>CHEST</option>
	<option>CLAVICLE</option>
	<option>BREAST</option>
	<option>ABDOMEN</option>
	<option>PELVIS</option>
	<option>HIP</option>
	<option>SHOULDER</option>
	<option>ELBOW</option>
	<option>KNEE</option>
	<option>ANKLE</option>
	<option>HAND</option>
	<option>FOOT</option>
	<option>FINGER</option>
	<option>EXTREMITY</option>
</select>
</div>
<div class="divDialog" id="mediaText25"><?php echo $nls_mediaDeleted; ?></div>
<div class="divDialog" id="mediaText26"><?php echo $nls_printPDF; ?></div>
<div id='overlayDiv'></div>	